package cn.imvc.app.controllers.system;

import org.apache.log4j.Logger;

import cn.imvc.core.DialogBean;
import cn.imvc.core.Render;
public class LoginControllerImpl implements LoginController {
	static Logger logger = Logger.getLogger(IndexControllerImpl.class);

	public String index() {
		return "login/index";
	}

	public String dialog() {

		return "login/dialog";
	}

	public String check() {

		return Render.text("");
	}

	public String success() {
		return Render.json(new DialogBean("200"));
	}

	public String error() {
		logger.warn("登陆失败");
		return Render.json(new DialogBean("300","用户名或密码错误！",""));
	}
	
	public String timeout(){
		return Render.json(new DialogBean("301","登陆超时！",""));
	}

}
